Skip to content

feat(ai-gateway): How-to for validating MCP tokens locally with JWK verification#4839

Open
tomek-labuk wants to merge 9 commits intomainfrom
jwk-mcp
Open

feat(ai-gateway): How-to for validating MCP tokens locally with JWK verification#4839
tomek-labuk wants to merge 9 commits intomainfrom
jwk-mcp

Conversation

@tomek-labuk
Copy link
Copy Markdown
Contributor

Description

Fixes #4820

Preview Links

Checklist

  • Tested how-to docs. If not, note why here.
  • All pages contain metadata.
  • Any new docs link to existing docs.
  • All autogenerated instructions render correctly (API, decK, Konnect, Kong Manager).
  • Style guide (capitalized gateway entities, placeholder URLs) implemented correctly.
  • Every page has a description entry in frontmatter.
  • Add new pages to the product documentation index (if applicable).

@netlify
Copy link
Copy Markdown

netlify Bot commented Apr 13, 2026

Deploy Preview for kongdeveloper ready!

Name Link
🔨 Latest commit f8d3faf
🔍 Latest deploy log https://app.netlify.com/projects/kongdeveloper/deploys/69e9c73af65e3700080b0ae4
😎 Deploy Preview https://deploy-preview-4839--kongdeveloper.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@tomek-labuk tomek-labuk marked this pull request as ready for review April 15, 2026 07:28
@tomek-labuk tomek-labuk requested a review from a team as a code owner April 15, 2026 07:28
Copilot AI review requested due to automatic review settings April 15, 2026 07:28
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a new MCP how-to guide for validating MCP access tokens locally via JWKS (JWK Set) verification with the AI MCP OAuth2 plugin, using Keycloak as the example authorization server.

Changes:

  • Introduces a new how-to page detailing JWKS-based token validation and a local Keycloak setup workflow.
  • Adds new Gateway service and route entity example YAMLs used by the how-to’s {% entity_examples %} blocks.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

File Description
app/_how-tos/mcp/validate-mcp-tokens-with-jwk.md New how-to describing JWKS-based local JWT validation for MCP using AI MCP OAuth2 + AI MCP Proxy, including validation steps.
app/_data/entity_examples/gateway/services/weather-jwk-service.yaml Adds the upstream WeatherAPI service used by the new how-to.
app/_data/entity_examples/gateway/routes/weather-jwk.yaml Adds the MCP listener route (including the protected-resource metadata path) used by the new how-to.
app/_data/entity_examples/gateway/routes/weather-jwk-route.yaml Adds the conversion-only tools route used by the new how-to.

Comment thread app/_how-tos/mcp/validate-mcp-tokens-with-jwk.md Outdated
Comment thread app/_how-tos/mcp/validate-mcp-tokens-with-jwk.md
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.

Comment thread app/_how-tos/mcp/validate-mcp-tokens-with-jwk.md
Comment thread app/_how-tos/mcp/validate-mcp-tokens-with-jwk.md
Comment on lines +8 to +16
works_on:
- on-prem
- konnect
min_version:
gateway: '3.14'
plugins:
- ai-mcp-oauth2
- ai-mcp-proxy
entities:
Copy link

Copilot AI Apr 15, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This how-to will be picked up by the automated how-to test runner (products include gateway/ai-gateway) but it depends on an external Keycloak container and manual setup steps, so it should either add an automated prereq that starts/configures Keycloak or set automated_tests: false in frontmatter to avoid CI failures.

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot apply changes based on [this feedback] add automated_tests: false(#4839 (comment))

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added automated_tests: false to the frontmatter in commit f8d3faf.

@CLAassistant
Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
1 out of 2 committers have signed the CLA.

✅ tomek-labuk
❌ Copilot
You have signed the CLA already but the status is still pending? Let us recheck it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(ai-gateway): How to for validating MCP tokens locally with JWK verification

4 participants